<?php
/**
 * (logic) 解析报告数据（临时数据转换为正式数据）
 */

namespace App\Logic\MonthlyReportLT\ParseTmp;

class ParseWork
{
    public static function parse($model,$date)
    {
        if('null' == $date){
            $date = date('Y-m-01',strtotime('midnight first day of -1 month'));
        }
        $class = self::$_class[$model];
        $class::exeParse($date);
    }

    private static $_class = ['sa' => ParsePaymentSales::class,
                              're' => ParsePaymentReFee::class,
                              'th' => ParsePaymentThFee::class,
                              's-fee' => ParseServiceFee::class,
                              'cancel-fee' => ParsePaymentCancelFee::class,
                            ];
}
